package com.zh.service.Imp;
import com.zh.dao.demoDao;
import com.zh.service.demoService;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;

public class demoServiceImp implements demoService, InitializingBean, DisposableBean {
    private demoDao demoDao;
    @Override
    public void add() {
        System.out.println("demoServiceImp-----save");
        demoDao.save();
    }

    public void setDemoDao(demoDao demoDao){
        this.demoDao=demoDao;
    }

    @Override
    public void destroy() throws Exception {
        System.out.println("demoService-------destroy");
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("demoService-------init ");
    }
}
